package com.mq.mqtt;

public class MainT {
    public static void main(String[] args) throws InterruptedException {
        MqttService service = MqttService.builder()
                .host("tcp://106.15.35.62:1883")
                .userName("rabbitmq")
                .passWord("123456")
                .clientId("myclientid_10001")
                .defaultTopic("MIDDOL-TEST")
                .cleanSession(true).build();

        service.sendMessage("这是java后端发送的消息");

        // service.closeClient(false);
    }
}
